import { AxiosRequestConfig } from "axios"

enum API {
    articles = "/articles",
    article = "/article",//末尾追加ID
    addArticle = "/addArticle",
    updateArticle = "/updateArticle",//末尾追加ID
    delArticle = "/delArticle/"
}


export const articlesCfg: AxiosRequestConfig = Object.freeze({
    url: API.articles
})

export const articleCfg: AxiosRequestConfig = {
    url: API.article
}

export const addArticleCfg: AxiosRequestConfig = {
    url: API.addArticle,
    method: 'post'
}
export const updateArticleCfg: AxiosRequestConfig = {
    url: API.updateArticle,
    method: 'put'
}

export const delarticleCfg: AxiosRequestConfig = {
    url: API.delArticle,
    method: 'delete'
}